/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sbbs.springboot.sample23;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * prefix="com.kfit.blog" ：
 *
 * 在application.properties配置的属性前缀，
 *
 * 在类中的属性就不用使用{@value}进行注入了。
 */
@ConfigurationProperties(prefix = "com.kfit.blog")
public class BlogPropertiesNew {

    @Value("${com.kfit.blog.name}")
    private String name;//博客作者

    @Value("${com.kfit.blog.title}")
    private String title;//博客标题

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

}
